package com.ruoyi.web.controller.chongyuhui;

import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.utils.PageUtils;
import com.ruoyi.system.domain.chongyuhui.TbSwipperEntity;
import com.ruoyi.system.service.congyuhui.TbSwipperService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


/**
 * (TbSwipper)表控制层
 *
 * @author makejava
 * @since 2024-05-27 22:58:52
 */
@RestController
@RequestMapping("tbSwipper")
public class TbSwipperController {


    @Autowired
    private TbSwipperService tbSwipperService;

    /**
     * 新增
     */
    @PostMapping("insert")
    public AjaxResult insert(@RequestBody TbSwipperEntity tbSwipperEntity) {
        tbSwipperService .insert(tbSwipperEntity);
        return AjaxResult.success("新增成功");
    }

    /**
     * 批量新增
     */
    @PostMapping("batchInsert")
    public AjaxResult batchInsert(@RequestBody List<TbSwipperEntity> tbSwipperEntities) {
        tbSwipperService .batchInsert(tbSwipperEntities);
        return AjaxResult.success("新增成功");
    }

    /**
     * 删除
     */
    @PostMapping("delete")
    public AjaxResult delete(@RequestBody TbSwipperEntity tbSwipperEntity) {
        tbSwipperService .delete(tbSwipperEntity);
        return AjaxResult.success("删除成功");
    }

    /**
     * 批量删除
     */
    @PostMapping("batchDelete")
    public AjaxResult batchDelete(@RequestBody List<TbSwipperEntity> tbSwipperEntities) {
        tbSwipperService .batchDelete(tbSwipperEntities);
        return AjaxResult.success("删除成功");
    }

    /**
     * 编辑
     */
    @PostMapping("update")
    public AjaxResult update(@RequestBody TbSwipperEntity tbSwipperEntity) {
        tbSwipperService .update(tbSwipperEntity);
        return AjaxResult.success("修改成功");
    }

    /**
     * 批量编辑
     */
    @PostMapping("batchUpdate")
    public AjaxResult batchUpdate(@RequestBody List<TbSwipperEntity> tbSwipperEntities) {
        tbSwipperService .batchUpdate(tbSwipperEntities);
        return AjaxResult.success("修改成功");
    }

    /**
     * 查询
     */
    @PostMapping("query")
    public AjaxResult query(TbSwipperEntity tbSwipperEntity) {
        return AjaxResult.success(tbSwipperService .query(tbSwipperEntity));
    }








}

